﻿"use strict";

angular.module('ecApp').factory('dataService', ['$timeout', '$http', function ($timeout, $http) {

    var projectTypes = [
        {
            id: 1000,
            name: 'common'
        }
    ];

    var _requestBuild = function (model) {
        return $http.post('/api/EasyCodes/RequestBuild', model).then(function (results) {
            return results;
        });
    };

    var getProjectTypes = function () {
        return $timeout(function () {
            return projectTypes;
        }, 500);
    };

    return {
        getProjectTypes: getProjectTypes,
        requestBuild: _requestBuild
    };

}]);